<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="//libs.baidu.com/jquery/1.10.2/jquery.min.js"></script>
    <script src="./herryPostMessage.js"></script>
  </head>
  <body>
    <script>
      herry.callback = async (data) => {
        if (data.action === "geta1") {
          herry.returnData(data.action, {x:2})
          // return { x: 2 };
        } else if (data.action === "geta2") {
          // return { x: 3 };
          herry.returnData(data.action, {x:3})
        }
      };
    </script>
  </body>
</html>
